import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
	state:{
		cusType:0,//客户端登录类型 0 系统管理员 1 订单处理员 2 业务员 3 客户
		userInfo:{},
		customerInfo:{},//客户登录时信息保存
	},
	mutations:{
		SET_TABBAR_INDEX(state,index){
			state.tabbarActiveIndex = index
		},
		SET_CUS_TYPE(state,num){
			state.cusType = num
		},
		SET_USER_INFO(state,userInfo){
			state.userInfo = userInfo
		},
		SET_CUSTOMER_INFO(state,userInfo){
			state.customerInfo = userInfo
		}
			
	}
})

export default store